The isosceles trapezoid shown has side lengths as labeled. How long is segment AC? [asy]
unitsize(1.5mm);
defaultpen(linewidth(.7pt)+fontsize(10pt));
dotfactor=3;

pair A=(0,0), B=(21,0), C=(15,8), D=(6,8);
pair[] dots={A,B,C,D};

draw(A--B--C--D--cycle);
dot(dots);
label("A",A,SW);
label("B",B,SE);
label("C",C,NE);
label("D",D,NW);
label("9",midpoint(C--D),N);
label("10",midpoint(D--A),NW);
label("21",midpoint(A--B),S);
label("10",midpoint(B--C),NE);
[/asy]
Answer: Define $E$ and $F$ to be the feet of the perpendiculars drawn to $AB$ from $C$ and $D$ respectively.  Since $EF=CD=9$, we find $AF=(21-9)/2=6$ and $AE=AF+FE=15$.  Also, from the Pythagorean theorem, $CE=DF=\sqrt{10^2-6^2}=8$.  Again using the Pythagorean theorem, $AC=\sqrt{CE^2+AE^2}=\sqrt{8^2+15^2}=\boxed{17}$ units.

[asy]
unitsize(1.5mm);
defaultpen(linewidth(.7pt)+fontsize(10pt));
dotfactor=3;
pair A=(0,0), B=(21,0), C=(15,8), D=(6,8), E=(15,0), F=(6,0);
pair[] dots={A,B,C,D,E,F};
draw(A--B--C--D--cycle);
draw(C--E);
dot(dots);
label("A",A,SW);
label("B",B,SE);
label("C",C,NE);
label("D",D,NW);
label("E",E,S);
label("F",F,S);
label("9",midpoint(C--D),N);
label("10",midpoint(D--A),NW);
label("21",midpoint(A--B)+(0,-2),S);
label("10",midpoint(B--C),NE);[/asy]